Subject: Re: CTRL-C Trapping
From: [email-masked] (Doug Walker)
Date: Wed, 26 May 1993 12:27:34 GMT
Newsgroups: comp.sys.amiga.programmer

In article <[email-masked]>, [email-masked] (David Prothero) writes:
|> Quick, easy question...
|> 
|> How do I trap a CTRL-C on a program that runs from the CLI so that I can do 
|> some clean up on my program before I exit?
|> 
|> Thanks... reply here or via e-mail.

You don't say what language you are using.  This is very important
information!  Please give us enough information to help you when
you ask the question.

If you are using C, your compiler's library is trapping CTRL-C for
you and exiting.  Look in your library documentation for information
on how to control this.

In SAS/C 6.0, you would simply declare a function like so:

   void __regargs _CXBRK(void)
   {
      /* Do your cleanup here */
   }

-- 
  *****                    / [email-masked]
 *|_o_o|\\     Doug Walker<  BIX, Portal: djwalker
 *|. o.| ||                \ CompuServe: 71165,2274
  | o  |//     
  ====== 
Any opinions expressed are mine, not those of SAS Institute, Inc.